/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.hl_project.entity;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 项目信息Entity
 * @author cww
 * @version 2019-01-21
 */
@Table(name="ajz_project_info", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="project_type", attrName="projectType", label="项目类别"),
		@Column(name="project_name", attrName="projectName", label="项目名称", queryType=QueryType.LIKE),
		@Column(name="street", attrName="street", label="所在街道"),
		@Column(name="address", attrName="address", label="地址"),
		@Column(name="legal_person", attrName="legalPerson", label="法人"),
		@Column(name="legal_person_tel", attrName="legalPersonTel", label="法人手机"),
		@Column(name="contact_person", attrName="contactPerson", label="联系人"),
		@Column(name="contact_person_tel", attrName="contactPersonTel", label="联系人手机"),
		@Column(name="join_contact_person", attrName="joinContactPerson", label="对接人"),
		@Column(name="join_contact_person_tel", attrName="joinContactPersonTel", label="对接人手机号"),
		@Column(name="duty_unit", attrName="dutyUnit", label="对接人手机号"),
		@Column(name="explain", attrName="explain", label="简介"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class AjzProjectInfo extends DataEntity<AjzProjectInfo> {
	
	private static final long serialVersionUID = 1L;
	private String projectType;		// 项目类别
	private String projectName;		// 项目名称
	private String street;		// 所在街道
	private String address;		// 地址
	private String legalPerson;		// 法人
	private String legalPersonTel;		// 法人手机
	private String contactPerson;		// 联系人
	private String contactPersonTel;		// 联系人手机
	private String joinContactPerson;		// 对接人
	private String joinContactPersonTel;		// 对接人手机号
	private String dutyUnit;		// 对接人手机号

	private String explain;		// 简介
	
	public AjzProjectInfo() {
		this(null);
	}

	public AjzProjectInfo(String id){
		super(id);
	}


	@ExcelFields({
			@ExcelField(title="项目名称", attrName="projectName", align=ExcelField.Align.CENTER, sort=10),
			@ExcelField(title="项目类别", attrName="projectType", align = ExcelField.Align.CENTER, sort=20),
			@ExcelField(title="所在街道", attrName="street", align=ExcelField.Align.CENTER, sort=30),
			@ExcelField(title="地址", attrName="address", align=ExcelField.Align.CENTER, sort=40),
			@ExcelField(title="项目联系人", attrName="contactPerson", align=ExcelField.Align.CENTER, sort=50),
			@ExcelField(title="联系人电话", attrName="contactPersonTel", align=ExcelField.Align.CENTER, sort=60),
			@ExcelField(title="责任单位", attrName="dutyUnit", align=ExcelField.Align.CENTER, sort=70),
			@ExcelField(title="责任联系人", attrName="joinContactPerson", align=ExcelField.Align.CENTER, sort=80),
			@ExcelField(title="责任人电话", attrName="joinContactPersonTel", align=ExcelField.Align.CENTER, sort=90),
			@ExcelField(title="简介", attrName="explain", align=ExcelField.Align.CENTER, sort=100),
			@ExcelField(title="备注", attrName="remarks", align=ExcelField.Align.CENTER, sort=110),
	})

	public String getDutyUnit() {
		return dutyUnit;
	}

	public void setDutyUnit(String dutyUnit) {
		this.dutyUnit = dutyUnit;
	}


	@NotBlank(message="项目类别不能为空")
	@Length(min=0, max=100, message="项目类别长度不能超过 100 个字符")
	public String getProjectType() {
		return projectType;
	}

	public void setProjectType(String projectType) {
		this.projectType = projectType;
	}
	
	@NotBlank(message="项目名称不能为空")
	@Length(min=0, max=20, message="项目名称长度不能超过 20 个字符")
	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}
	
	@NotBlank(message="所在街道不能为空")
	@Length(min=0, max=64, message="所在街道长度不能超过 64 个字符")
	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}
	
	@Length(min=0, max=255, message="地址长度不能超过 255 个字符")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=0, max=200, message="法人长度不能超过 200 个字符")
	public String getLegalPerson() {
		return legalPerson;
	}

	public void setLegalPerson(String legalPerson) {
		this.legalPerson = legalPerson;
	}
	
	@Length(min=0, max=20, message="法人手机长度不能超过 20 个字符")
	public String getLegalPersonTel() {
		return legalPersonTel;
	}

	public void setLegalPersonTel(String legalPersonTel) {
		this.legalPersonTel = legalPersonTel;
	}
	
	@Length(min=0, max=255, message="联系人长度不能超过 255 个字符")
	public String getContactPerson() {
		return contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}
	
	@Length(min=0, max=20, message="联系人手机长度不能超过 20 个字符")
	public String getContactPersonTel() {
		return contactPersonTel;
	}

	public void setContactPersonTel(String contactPersonTel) {
		this.contactPersonTel = contactPersonTel;
	}
	
	@Length(min=0, max=255, message="对接人长度不能超过 255 个字符")
	public String getJoinContactPerson() {
		return joinContactPerson;
	}

	public void setJoinContactPerson(String joinContactPerson) {
		this.joinContactPerson = joinContactPerson;
	}
	
	@Length(min=0, max=20, message="对接人手机号长度不能超过 20 个字符")
	public String getJoinContactPersonTel() {
		return joinContactPersonTel;
	}

	public void setJoinContactPersonTel(String joinContactPersonTel) {
		this.joinContactPersonTel = joinContactPersonTel;
	}
	
//	@Length(min=0, max=255, message="简介长度不能超过 255 个字符")
	public String getExplain() {
		return explain;
	}

	public void setExplain(String explain) {
		this.explain = explain;
	}
	
}